package test.y2019.november;

import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Console;

import java.sql.Timestamp;
import java.util.Date;

/**
 * @author songx
 * @date 2019/11/14 22:23
 */
public class November5 {
    public static void main(String[] args) {
        Timestamp timestamp = new Timestamp(1573741445000L);
        Console.error(timestamp);

        Date lose = DateUtil.date(timestamp);
        String loseYmd = lose.toString().split(" ")[0];
        DateTime last = new DateTime(String.format("%s 23:59:59", loseYmd), DatePattern.NORM_DATETIME_FORMAT);
        Console.error(last.toTimestamp());

        DateTime offsetDay = DateUtil.offsetDay(last, 6);
        Console.error(offsetDay.toTimestamp());

    }
}
